package com.jwsoft.manager.core.task.sjgx;

import com.alibaba.fastjson.JSON;
import com.jwsoft.manager.common.vo.common.AreaControlVO;
import com.jwsoft.manager.core.integration.BatchCallSjgxIntegration;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 网签大数据获取定时任务
 * @author chenzh
 */
@Component
@Slf4j
public class WqTaskJob {
    @Autowired
    BatchCallSjgxIntegration batchCallSjgxIntegration;

    @XxlJob("saveNetsignInterfaceData")
    public void sjgxWqJobHandler() {
        XxlJobHelper.log("XXL-JOB, saveNetsignInterfaceData");
        String str=XxlJobHelper.getJobParam();
        AreaControlVO vo= JSON.parseObject(str, AreaControlVO.class);
        log.info("大数据网签获取开始");
        batchCallSjgxIntegration.saveBatchNetSignInterfaceFree(vo);
        log.info("大数据网签获取结束");
    }
}
